<?php 
$this->jQuery()->enable();
$this->headLink()->prependStylesheet('/js/jquery/css/themes/base/jquery.ui.all.css');
$this->headScript() ->appendFile('/js/jquery/jquery-ui-1.8.12.custom.min.js')
					->appendFile('/js/jquery/ui/jquery.ui.widget.js')
					->appendFile('/js/jquery/ui/jquery.ui.core.js')					
					->appendFile('/js/jquery/ui/jquery.ui.dialog.js')					
					->appendFile('/js/jquery/ui/jquery.ui.draggable.js')
					->appendFile('/js/jquery/ui/jquery.ui.position.js')
					->appendFile('/js/jquery/ui/jquery.ui.resizable.js')
					->appendFile('/js/jquery/ui/jquery.ui.mouse.js')
					->appendFile('/js/jquery/ui/jquery.ui.button.js')					
					->appendFile('/js/geralAjax.js');
					

$this->headScript()->appendScript("
$(document).ready(function(){
 $('#confirme').dialog({
        height: 140,
        autoOpen: false,
        modal: true,
        resizable: false});               
      
});");

$translator = Zend_Registry::get('translator');?>
<div id="flash-messeger"><?php echo $this->flashMessenger(); ?></div>
<div id="mapa">Campanhas/<span>Campanhas em envio</span></div>
<table class="grid">
	<thead>
		<tr>
			
			<th><?php echo $translator->_('CAMPANHA');?></th>
			<th><?php echo $translator->_('DATAENVIO');?></th>
			<th><?php echo $translator->_('ACOES');?></th>
			<th><?php echo $translator->_('STATUS');?></th>
			
		</tr>
	</thead>
	<tbody>
       <?php foreach ($this->listaCampanhasAtivasPaginacao as $campanha) :?>
        <tr>
			
			<td><?php echo $campanha['nome'];?></td>
			<td><?php $dateTime = new Zend_Date($campanha['dataenvio']); echo '<strong>'.$dateTime.'</strong>';?></td>
			<td class="opcoes" align="center" >
				<a title="<?php echo $translator->_('EDITAR');?>" href="
					<?php echo $this->url(array(
						'action' => 'editar-envio-campanha', 
						'controller' => 'campanha',
						'module' => 'admin', 
						'id' => $campanha['idcampanha']));
					?>"><img border="0" src="/imagens/icons/clock_edit.png"></a>		
			</td>
			<td>
				<div id="status-campanha"><?php echo $this->verificaStatusCampanha($campanha['idcampanha']);?></div>
			</td>
		</tr>
        <?php endforeach;?>
        <tr>
        <td colspan="4"><div align="right" style="font-size: 70%;"><strong><?php echo $translator->_('LEGENDA');?>:</strong>&nbsp&nbsp<img border="0" src="/imagens/icons/clock_edit.png"> <?php echo $translator->_('EDITAR');?> </div></td>
        </tr>          
    </tbody>
</table>
<?php echo $this->paginationControl($this->listaCampanhasAtivasPaginacao, 'Sliding', 'paginacao.phtml');?>
<div id="confirme" title="<?php echo $translator->_('EXCLUIR_CAMPANHA');?>">
	<p><span class="ui-icon ui-icon-alert" style="float:left; margin:0 7px 20px 0;"></span><?php echo $translator->_('DELETAR_CAMPANHA');?></p>
</div>